<template>
  <div>
    <h2>报名信息API测试页面</h2>
    <el-button @click="testApi">测试API请求</el-button>
    <div v-if="result">
      <h3>API响应结果：</h3>
      <pre>{{ JSON.stringify(result, null, 2) }}</pre>
    </div>
    <div v-if="error">
      <h3>API错误：</h3>
      <pre>{{ error }}</pre>
    </div>
  </div>
</template>

<script>
import { applyInfoListApi } from '@/api/applyInfo';

export default {
  name: 'ApplyInfoTest',
  data() {
    return {
      result: null,
      error: null,
    };
  },
  methods: {
    testApi() {
      console.log('开始测试API请求');
      this.result = null;
      this.error = null;
      
      const params = {
        page: 1,
        limit: 20,
      };
      
      applyInfoListApi(params)
        .then((res) => {
          console.log('API请求成功：', res);
          this.result = res;
        })
        .catch((err) => {
          console.error('API请求失败：', err);
          this.error = err;
        });
    },
  },
};
</script> 